<template>
<div class="addContPlan">
  <el-form label-position="top" :model="formStacked" class="demo-form-stacked" :rules="rules" ref="formStacked">
    <el-form-item :label="$t('customer.contactPlan.contactPlanContent')" prop="contactContent">
      <el-input size="mini" v-model.trim="formStacked.contactContent" m7automation="contactPlanContent_input"></el-input>
    </el-form-item>
    <el-form-item :label="$t('customer.contactPlan.contactPlanTime')" prop="region">
        <el-date-picker size="mini"
        v-model.trim="formStacked.region"
        type="datetime"
        :editable="false"
        :picker-options="pickerOptions"
        :format="'yyyy-MM-dd HH:mm'"
        :placeholder="$t('public.pickTime')"
        :disabledDate="pickerOptions.disabledDate"
        align="left"
        style="width:350px" m7automation="contactPlanTime_click">
      </el-date-picker>
    </el-form-item>
    <el-form-item :label="$t('customer.contactPlan.excute')" prop="executor">
      <m7Select style="width: 300px" class="el-select" ref="m7Select" filterable :options="agentOptions" v-model="formStacked.executor"></m7Select>
    </el-form-item>
  </el-form>
  <div class="add-cont-plan-btn">
    <el-button type="primary" @click.stop="submitForm" v-if="editType === 'add'" m7automation="contactPlan_save">{{ $t('public.save') }}</el-button>
    <el-button type="primary" @click.stop="update" v-if="editType === 'edit'" m7automation="contactPlan_update">{{ $t('public.update') }}</el-button>
  </div>
</div>
</template>

<script>
  import addPlan from '@/components/public-modules/cust-tab-content/contact-plan/addPlan.js'
  export default {
    name: 'AddContactPlan',
    mixins: [addPlan]
  }
</script>

<style lang="stylus" scoped>
  .create-cp
    .el-form-item
      color #c1c1c1
      margin-bottom 12px
      &:last-child
        margin-bottom 0px
    .el-button
      width 90px
      float right
      padding 8px 0
      font-size 12px
  .addContPlan
    position relative
  .add-cont-plan-btn
    position absolute
    right 0px
    bottom 2px
</style>
